1. Field of the Invention
The present invention relates to the area of computing coefficients used in image codec, and more particularly to an operational unit for performing the coefficient scaling computations.
2. Description of Related Art
In the field of image encoding/decoding, various image coding/decoding standards will exist concurrently for a very long time. The compatibility with various standards becomes an essential feature for image processing chips. The chips that are provided with various image encoding/decoding algorithms and compatible with multiple image protocols are commonly referring to as “multi-mode image encoding/decoding chips”. The current design approach for designing multi-mode image coding/decoding chips is to add another coding/decoding protocol based on the originally designed encoding/decoding protocol. For example, in the encoding/decoding algorithms for WMV9 protocol and MPEG4 protocols, their coefficient scaling computation in coefficient estimation is conducted separately according to their respective coefficient scaling operational formula.
The coefficient scaling operational formula for the MPEG4 is:(QFA*QPA)//QPX,  (1)wherein QFA is a coefficient, QPA is a quantization parameter, QPX is a quantization parameter and QPXε[1,31], QPX is an integral.
The coefficient scaling operational formula for the WMV9 is: DCp=(DCp*DCSTEPp*DQScale[DCSTEPc]+0x20000)>>18  (2)wherein DCp is a coefficient, DCSTEPp is a quantization parameter, DCSTEPc is an index parameter and DCSTEPcε[1,31], the DCSTEPc is a variable, DQScale[DCSTEPc] is a function of DCSTEPc, of which the value list are shown as follows:
DCSTEPcDQScale [DCSTEPc] 1262144 2131072 387381 465536. . . 832768. . .1123831. . .1418725. . .1814564. . .2211916. . .2610082. . .289362299039308738318456
In multi-mode image coding/decoding chips, to realize the coefficient scaling computation for these two protocols according to the respective corresponding formulas, two different arithmetic logic units have to be provided, thereby increasing the quantity of hardware modules, the chip size and the production cost.
Thus there is a need for techniques for a coefficient scaling operational unit capable of performing the coefficient scaling computation for different encoding/decoding standards or image compression schemes.